#include<stdio.h>
#include<string.h>
#include<math.h>
#include<stdlib.h>
#include<ctype.h>
#include<string.h>

#define SQUARE(x) (x)*(x)
#define MAX(x,y) ((x)>(y)?(x):(y))
#define MIN(x,y) ((x)<(y)?(x):(y))

int F[22], n, i;
void fill() {
	F[1] = F[2] = 1;
	int i;
	for (i = 3; i < 22; i++)
		F[i] = F[i - 1] + F[i - 2];
}
int main() {
	fill();
	for (scanf("%d", &n); n--; scanf("%d", &i), printf("%d\n", F[i]))
		;
	return 0;
}
